package com.composite.demo1.impl;

import com.composite.demo1.Company;

/**
 * Leaf 在组合中表示叶子结点对象，叶子结点没有子结点。
 *
 * @author Administrator
 *
 */
public class FinanceDepartment extends Company {

	public FinanceDepartment() {

	}

	public FinanceDepartment(String name) {
		super(name);
	}

	@Override
	public void add(Company company) {

	}

	@Override
	public void display(int depth) {
		StringBuilder sb = new StringBuilder("");
		for (int i = 0; i < depth; i++) {
			sb.append("-");
		}
		System.out.println(new String(sb) + this.getName());
	}

	@Override
	public void romove(Company company) {

	}

}
